package cn.iocoder.yudao.module.promotion.fod.dao;

import cn.iocoder.yudao.framework.business.basic.dao.mapper.CoreMapper;
import cn.iocoder.yudao.module.promotion.fod.pojo.po.FirstOrderDiscountVipRecharge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 平台首单优惠（会员充值） Mapper
 *
 * @author 山野羡民（1032694760@qq.com）
 */
@Mapper
public interface FirstOrderDiscountVipRechargeMapper extends CoreMapper<FirstOrderDiscountVipRecharge> {

    @Select("""
            SELECT DISTINCT user_id
            FROM promotion_first_order_discount_vip_recharge
            WHERE used = TRUE AND deleted = FALSE
            """)
    List<Long> selectUsedUserIds();

}
